import re

rs = re.findall('abc', 'abc')
rs = re.findall('a.c', "abc")
rs = re.findall("a[bc]d", "abd")

rs = re.findall('\d', "123zxczczx")
rs = re.findall('\w', "123zxczczxz中文@#@")

rs = re.findall('\w+', "123zxczczx")
rs = re.findall('1\w*', "123zxczczx")

rs = re.findall('1\w{5}', "123zxczczx")
print(rs)


# r原串在正则中可以清除转义字符的影响
rs = re.findall('a\\\\nbc', 'a\\nbc')
print(rs)
rs = re.findall(r'a\\nbc', 'a\\nbc')
print(rs)


